<template>
  <div class="container">
    <el-card class="my-box-card">
      <el-form ref="dataForm" :model="record" label-position="top" size="small"  label-width="110px">
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="个人客户编码" prop="customerCode">
                <el-input v-model="record.customerCode" placeholder="个人客户编码" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="姓名" prop="personalName">
                <el-input v-model="record.personalName" placeholder="姓名" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="联系电话" prop="telephone">
                <el-input v-model="record.telephone" placeholder="联系电话" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="证件号" prop="idNumber">
                <el-input v-model="record.idNumber" placeholder="证件号" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="证件类型" prop="idType">
                <el-input v-model="record.idType" placeholder="证件类型" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
    </el-card>
  </div>
</template>
<script>
import {
  Select
} from '@/api/basicInfo/mdmIndividualCustomer'
  export default {
    name: 'mdmIndividualCustomerView',
    props: ['openType', 'handlingType', 'formId'],
    data() {
      return {
        record: {
          mdmIndividualCustomerId: '',
          title: 'MDM个人客户信息',
          customerCode: '',
          personalName: '',
          telephone: '',
          idNumber: '',
          idType: ''
        },
      }
    },
    created() {
      this.fetchData()
      //this.auditWithdrawEnable()
    },
    watch: {
      recordId() { // 普通的watch监听通的watch监听
        this.fetchData()
        //this.auditWithdrawEnable()
      }
    },
    methods: {
      fetchData() {
        let queryArgs = {
            condition: {
            mdmIndividualCustomerId: {
              property: 'mdmIndividualCustomerId',
              value: '',
              type: 'EQ'
            }
          },
        }
        if (this.formId) {
          queryArgs.condition.mdmIndividualCustomerId.value = this.formId
        }
        Select(queryArgs).then(res => {
          this.loading = false
          this.record = res.data.data.records[0]
        }).catch((err) => {
          console.log(err)
        })
      },
    }
  }
</script>
<style scoped>
  .container{
    padding: 0 10px;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .my-box-card >>> .el-card__body {
    padding: 5px;
  }
  .auditBtnDiv {
    height: 45px;
    overflow: auto;
  }
  .auditBtnDiv >>> .el-button {
    margin: 5px 0px 5px 7px;
  }
</style>
